// Shelly官方文档地址https://shelly-api-docs.shelly.cloud/gen2/ 
/// Shelly.ts

export const ShellyHTTPAddress = 'http://192.168.33.1:/rpc'

export const ShellyWebSocketAddress = 'ws://192.168.33.1/rpc'

export interface ShellyRPCRequest {
    id: number;
    src: string;
    method: string;
    params?: any;
}

/**
 * Shelly RPC common response.
 */
export interface ShellyRPCResponse {
    id: number;
    src: string;
    result?: any;
    dst: string;
    error?: { code: number; message: string };
}
// result: { restart_required: true }

/**
 * Shelly BLE Characteristics.
 */
export enum ShellyBLECharacteristics {
    readWrite = '5F6D4F53-5F52-5043-5F64-6174615F5F5F',
    readNotify = '5F6D4F53-5F52-5043-5F72-785F63746C5F',
    write = '5F6D4F53-5F52-5043-5F74-785F63746C5F'
}